home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / QuickTime VR / MacOS / QuickDraw™ 3D 1.0.6F4 SDK / Development / RAVE DDK 1.0.6 GM for MacOS / Projects / Empty Engine Code / TtRender.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-30  |  4.0 KB  |  130 lines  |  [TEXT/MPCC]

  1. /******************************************************************************
  2.  **                                                                             **
  3.  **     Module:        TtRender.c                                                 **
  4.  **                                                                          **
  5.  **     Purpose:     Empty rasterizer drawing engine.                         **
  6.  **                 Methods for starting and ending rendering, and for         **
  7.  **                    flush and sync.                                             **
  8.  **                                                                          **
  9.  **     Author:        Mike W. Kelley                                             **
  10.  **                                                                          **
  11.  **                    2/3/95    Revised for 0.9 SDK release                         **
  12.  **                                                                          **
  13.  **     Copyright (C) 1994-95 Apple Computer, Inc.  All rights reserved.     **
  14.  **     Apple Computer Confidential                                             **
  15.  **                                                                          **
  16.  *****************************************************************************/
  17.  
  18. /* Private */
  19. #include "Drive3D.h"
  20. #include "Drive3D_system.h"
  21. #include "TtTinselTown.h"
  22.  
  23. /************************************************************************************************
  24.  *    TtRenderStart
  25.  ***********************************************************************************************/
  26.  
  27. void TtRenderStart (
  28.     const TQADrawContext    *drawContext,        /* Draw context */
  29.     const TQARect        *dirtyRect,            /* Minimum area to clear; NULL means whole buffer */
  30.     const TQADrawContext    *initialContext)    /* Initial background image (or NULL) */
  31. {
  32.     TTtDrawPrivate        *myPrivate;
  33.     
  34.     myPrivate = (TTtDrawPrivate *) drawContext->drawPrivate;
  35.     
  36.     /*
  37.      * Initialize the ARGB and Z buffers for rendering.
  38.      *
  39.      * If this is a single-buffered context, and we're drawing directly to the screen,
  40.      * and we don't have a hardware cursor, this is a good time to do a ShieldCursor().
  41.      */
  42. }
  43.  
  44. /************************************************************************************************
  45.  *    TtRenderEnd
  46.  ***********************************************************************************************/
  47.  
  48. TQAError TtRenderEnd (
  49.     const TQADrawContext    *drawContext,        /* Draw context */
  50.     const TQARect        *modifiedRect)        /* Minimum area to swap; NULL means whole buffer */
  51. {
  52.     TTtDrawPrivate        *myPrivate;
  53.     
  54.     myPrivate = (TTtDrawPrivate *) drawContext->drawPrivate;
  55.     
  56.     /*
  57.      * If this is double-buffered, display the back buffer. If we called ShieldCursor()
  58.      * in TtRenderStart(), now's the time to call ShowCursor(). Note that this call
  59.      * isn't blocking -- for example, we could start a back-to-front buffer blit and
  60.      * then return. (If the app wants blocking behavior, TtSync() will be called.)
  61.      *
  62.      * RenderEnd returns an error value. If there were no errors on this frame,
  63.      * kQANoErr should be returned.
  64.      */
  65.     
  66.     return (kQANoErr);
  67. }
  68.  
  69. /************************************************************************************************
  70.  * Abort any current rendering in progress.
  71.  ***********************************************************************************************/
  72.  
  73. TQAError TtRenderAbort (
  74.     const TQADrawContext    *drawContext)        /* Draw context */
  75. {
  76.     TTtDrawPrivate        *myPrivate;
  77.     
  78.     myPrivate = (TTtDrawPrivate *) drawContext->drawPrivate;
  79.     
  80.     /*
  81.      * Kill any rendering commands, free any resources, and recover.
  82.      */
  83.     
  84.     return (kQANoErr);
  85. }
  86.  
  87. /************************************************************************************************
  88.  *    TtFlush
  89.  ***********************************************************************************************/
  90.  
  91. TQAError TtFlush (
  92.     const TQADrawContext    *drawContext)        /* Draw context */
  93. {
  94.     TTtDrawPrivate        *myPrivate;
  95.     
  96.     myPrivate = (TTtDrawPrivate *) drawContext->drawPrivate;
  97.     
  98.     /*
  99.      * If rendering commands are queued, start running them.
  100.      */
  101.     
  102.     return (kQANoErr);
  103. }
  104.  
  105. /************************************************************************************************
  106.  *    TtSync
  107.  ***********************************************************************************************/
  108.  
  109. TQAError TtSync (
  110.     const TQADrawContext    *drawContext)        /* Draw context */
  111. {
  112.     TTtDrawPrivate        *myPrivate;
  113.     
  114.     myPrivate = (TTtDrawPrivate *) drawContext->drawPrivate;
  115.     
  116.     /*
  117.      * Don't return until all outstanding rendering is complete. Note that this may
  118.      * be called after TtRenderEnd().
  119.      */
  120.     
  121.     return (kQANoErr);
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.